import minRequest from '@/config/minRequest.js'
const url = '/customer'
/**
 * 名片信息
 */
export const businessCard = (data) => minRequest.get(url + '/businessCard/getBusinessCard', data)

/**
 * 没登录的名片信息
 */
export const nobusinessCard = (data) => minRequest.get(url + '/businessCard/open/getBusinessCardNoToken', data)

/**
 * 默认名片获取appid得到tendid（新
 */
export const appIdCard = (appId) => minRequest.get(url + `/businessCard/open/getTenantIdByAppId/${appId}`)

/**
 * 默认名片tendid获取名片信息（新
 */
export const tenantCard = (tenantId) => minRequest.get(url + `/businessCard/getBusinessCardByTenantId/${tenantId}`)

/**
 * 用户名片信息
 */
export const userCard = (id) => minRequest.get(url + `/businessCard/getBusinessCardById/${id}`)

/**
 * 没登录的用户名片信息
 */
export const nouserCard = (id) => minRequest.get(url + `/businessCard/open/getBusinessCardByIdNoToken/${id}`)

/**
 * 海报二维码
 */
export const getMiniCodeByCustomer = (data) => minRequest.post(url + `/wechat/getMiniCodeByCustomer`, data)

/**
 * 填写成为业务员需要的信息
 */
export const toBeSalesman = (data) => minRequest.post(url + `/want_to_be_salesman/wantToBeSalesman`, data)

/**
 * 成为会员找人付-下单
 */
export const becomeAMemberAndFindSomeoneToPayForOrders = (data) => minRequest.post(url + `/member/becomeAMemberAndFindSomeoneToPayForOrders`, data)

/**
 * 成为会员找人付-付款
 */
export const becomeAMemberAndFindSomeoneToPay = (data) => minRequest.post(url + `/member/becomeAMemberAndFindSomeoneToPay`, data)

/**
 * 成为会员获取支付参数
 */
export const placeChickenAnOrder = (data) => minRequest.post(url + `/member/placeChickenAnOrder`, data)

/**
 * 判断是否是十蜂会员
 */
export const checkHaveOrderMember = (data) => minRequest.post(url + `/member/checkHaveOrderMember`, data)


export const transfer = (data) => minRequest.post(url + `/cardPack/transfer`, data)

export const cardPack = (data) => minRequest.get(url + `/cardPack/list`, data)
// 根据客户手机号获取信息
export const cardPackLog = (data) => minRequest.get(url + `/cardPackLog/list`, data)

// 根据业务员ID获取该对应的客户ID
export const getCustomerIdBySalesmanId = (salesmanId) => minRequest.get(url + `/want_to_be_salesman/getTheCustomerIdBySalesmanId/${salesmanId}`)

// 点击私信-创建房间
export const chatRoom = (uId) => minRequest.get(url + `/chat_room_friend/createFriendRoom/${uId}`)

//评论列表
export const listReview = (data) => minRequest.post(url + `/video/review/listReview`, data)

//添加评论
export const addReview = (data) => minRequest.post(url + `/video/review/addReview`, data)


//客户小程序 视频类型
export const videoTypeTreeList = (data) => minRequest.post(url + `/video_type_customer/open/getVideoTypeTree`, data)

// 根据活动ID判断用户是否已经参加过活动
// export const getReceiveBtn = (activityId) => minRequest.get(url + `/v103/order/checkUserHasParticipated/${activityId}`)
export const getReceiveBtn = (data) => minRequest.get(url + `/v103/order/areThereAnyOrdersPurchasedByMembers`, data)

